<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<div id="test">
			<div style="border: 1px solid black;">
				<p>{{ value }}</p>
			</div>
			<input type="text" v-model='value' v-on:input='out' />
			<button @click='out'>asdfasdf</button>
		</div>
		<script src="http://cdn.bootcss.com/jquery/3.1.1/jquery.min.js"></script>
		<script src="../vue.min.js"></script>
		<script type="text/javascript">
			
			new Vue({
				el:'#test',
				data:{
					text1:'&#x3000;sadfasdf asdfasdf ;jkj; ',
					value:''
				},
				mounted:function(){
					
					
				},
				filters: {
				    trim: function(value) {
				      if (!value) {return ''}
				      value = value.toString()
				      return value.replace(/(^\s*)|(\s*$)/g, "");
				      
				    }
			 },
			 methods:{
			 	out:function(){
			 		console.log(this.value)
//			 		this.value = this.filter.trim(this.value)
			 	}
			 }
			})
			

		</script>
	</body>
</html>
